package arithmetic;

import java.util.Scanner;

/**
 * @program: javaLearn
 * @description: 寻找只有两个数的个数是奇数（异或运算）
 * @author: renhai
 * @Date ：2022/3/1 23:03
 **/
public class LookingOddS {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String nums = scanner.nextLine();
        int len = nums.split(" ").length;
        int eor = 0;
        int eor1 = 0;
        for (int i = 0; i < len; i++) {
            eor = eor ^ Integer.parseInt(nums.split(" ")[i]);//异或运算得到a^b
        }
        //eor必然有一个位置上是1
        int rightOne = eor & (~eor + 1);//把某个不等于0的数的最右侧的1提取出来
        System.out.println(rightOne);
        for (int i = 0; i < len; i++) {
            if ((Integer.parseInt(nums.split(" ")[i]) & rightOne) == 0) {
                eor1 ^= Integer.parseInt(nums.split(" ")[i]);
            }
        }
        int b = eor ^ eor1;
        System.out.println(eor1);
        System.out.println(b);
    }
}
